package java67_adv5;

public class Game {
	private String name = "英雄联盟";
	private Hero hero;

	public void begin() {
		while (true) {
			Monster m = new Monster();
			double r = Math.random();

			Shield sh = new Shield(49);
			if (r > 0.5) {
				hero.catchShield(sh);
			} else {
				m.catchShield(sh);
			}
			hero.attack(m);
			if (hero.getLiving() <= 0) {
				System.out.println("Game over");
				break;
			}
		}
	}
}
